import config from '@/utils/config';
import { MockMethod } from 'vite-plugin-mock';

// 购物车
const cartDatas = {
  url: config.url.cart_list,
  method: 'post',
  response: () => {
    return {
      code: 200,
      data: [
        {
          id: 1,
          name: '探界者真皮双肩包 黑色',
          subTitle: '',
          image: 'https://img.youpin.mi-img.com/shop-fe/b7e5faa6_82f0_4096_8bb7_c967641ab9b0.png',
          price: 37900,
          marketPrice: 39900,
          promoPrice: 0,
          stock: 100,
          lowStock: 10,
          sn: '1',
          commentNum: 100,
          commentScore: 95,
          publishStatus: 1,
          newStatus: 1,
          recommendStatus: 1,
          promoStatus: 0,
          points: [
            {
              name: '15天价保',
              value: 'PROTECT_PRICE',
            },
            {
              name: '24期免息',
              value: 'INTEREST_FREE',
            },
          ],
          skuInfo: {
            id: 11,
            goodsId: 1,
            price: 37900,
            marketPrice: 39900,
          },
        },
        {
          id: 2,
          name: '可碎冰真冰沙|臻米10叶刀头直饮便携榨汁杯 J5 珍珠 白 340ML',
          subTitle: '珍珠白340ML',
          image: 'https://img.youpin.mi-img.com/shop-fe/999cc261_8e2f_4e15_80c9_a986999c8d75.png',
          price: 13900,
          marketPrice: 19900,
          promoPrice: 12900,
          stock: 111,
          lowStock: 11,
          sn: '2',
          commentNum: 111,
          commentScore: 99,
          publishStatus: 1,
          newStatus: 0,
          recommendStatus: 0,
          promoStatus: 1,
          points: [{}, {}, {}],
          skuInfo: {
            id: 12,
            goodsId: 2,
            price: 13900,
            marketPrice: 19900,
            promoPrice: 12900,
            promoStatus: 1,
            promoType: 0,
          },
        },
      ],
      message: 'success',
    };
  },
};

export default [cartDatas] as MockMethod[];
